// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
//import Vue from 'vue'
import App from './App'
import router from './router/router'
import utils from "@/utils/utils";
import http from "@/axios/http";
import store from "@/store/store";
import plusReady from "@/H5Plus/plusReady";
import "@/assets/css/global.css"; /*引入全局样式*/
Vue.config.productionTip = false

Vue.prototype.$http = http;
Vue.prototype.$utils = utils;
Vue.prototype.$plusReady = plusReady;



new Vue({
  el: '#app',
  store,
  router,
  components: { App },
  template: '<App/>'
})

/**
 * catch error
 * @param {*} error 
 * @param {*} vm 
 */
const errorHandler = (error, vm) => {
  console.log("抛出全局异常");
  console.log(vm);
  console.log(error);
};
Vue.config.errorHandler = errorHandler;
Vue.prototype.$throw = error => errorHandler(error, this);

